package br.com.dbsti.agenda;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
@Table(name="GEFILIAL")
@SequenceGenerator(name="SeqFilial", initialValue=1, allocationSize=1, sequenceName="SQ_FILIAL")
public class Empresa implements Serializable {
    
    @Id 
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="SeqFilial")
    private Long codigo;
    @Column(name="descricao", nullable=false)
    private String nome;
    @Column(length=14)
    private String cnpj;
    private String endereco;
    private Boolean ativo;

    public String getCnpj() {
        return cnpj;
    }

    public void setCnpj(String cnpj) {
        this.cnpj = cnpj;
    }

    public Long getCodigo() {
        return codigo;
    }

    public void setCodigo(Long codigo) {
        this.codigo = codigo;
    }

    public String getEndereco() {
        return endereco;
    }

    public void setEndereco(String endereco) {
        this.endereco = endereco;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

}
